<?php

include "connect.php";
$year_id=$_POST['year_id'];
$year_name=$_POST['year_name'];

$sq=mysql_query("select * From year where year_id='$year_id'");
while ($row = mysql_fetch_array($sq)) {
$sql=mysql_query("UPDATE year SET 
year_id='$year_id',year_name='$year_name'
  where year_id='$year_id'");


header("Location:update_year_success.php");
}
?>